package com.zy.bean1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan
public class App1 {
    public static void main(String[] args) {
        //测试目标:  @Value是否完成了注入
        ApplicationContext ac = new AnnotationConfigApplicationContext(App1.class);
        Product p = ac.getBean(Product.class);
        System.out.println(p);   // 相当于输出 p.toString();
    }
}
